﻿using CodeMan.DbOther;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace CodeMan.EntityFrameworkCore.Other
{

    [ConnectionStringName("DefaultMMSqlOther")]
    public class CodeManOtherDbContext : AbpDbContext<CodeManOtherDbContext>
    {
        public DbSet<TableEntity> ClassGens { get; set; }

        public CodeManOtherDbContext(DbContextOptions<CodeManOtherDbContext> options)
        : base(options)
        {
            
        }
        protected override void OnModelCreating(ModelBuilder builder)
        {
            //base.OnModelCreating(builder);

            /* Configure the shared tables (with included modules) here */

            //builder.Entity<AppUser>(b =>
            //{
            //    b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "Users"); //Sharing the same table "AbpUsers" with the IdentityUser

            //    b.ConfigureByConvention();
            //    b.ConfigureAbpUser();

            //    /* Configure mappings for your additional properties
            //     * Also see the CodeManEfCoreEntityExtensionMappings class
            //     */
            //});

            builder.Entity<TableEntity>(b =>
            {
                b.ToTable("user");
            });


            /* Configure your own tables/entities inside the ConfigureCodeMan method */

        }

    }
}
